﻿namespace NGeo.Yahoo.PlaceFinder
{
    public class ReverseRequest : Request
    {
        public double Latitude { get; set; }
        public double Longitude { get; set; }

        public override string GetGFlagsAsString()
        {
            var gFlags = base.GetGFlagsAsString();

            // Reverse geocode coordinates for each result.
            var reverseLetter = RequestGFlag.Reverse.GetEnumMemberAttribute().Value;
            if (!gFlags.Contains(reverseLetter))
                gFlags = string.Format("{0}{1}", gFlags, reverseLetter);

            return gFlags;
        }

        public string ReverseQuery
        {
            get { return string.Format("{0} {1}", Latitude, Longitude); }
        }

    }
}
